package com.stm.bi.jdbc;

import com.stm.framework.core.util.SpringContextUtil;
import com.stm.framework.dbcp.JdbcService;
import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;

/**
 * @author zhouyuanpeng
 * @date 2025-03-17 16:33
 */
public class JdbcUtil {
    public static JdbcService getOdsJdbcService()  {
        DataSource dataSource = SpringContextUtil.getBean(MultiDataSourceConfig.DATASOURCE_ODS_PREFIX);
        JdbcTemplate jdbcTemplate =  new JdbcTemplate(dataSource);
        JdbcService jdbcService = new JdbcService();
        jdbcService.setJdbcTemplate(jdbcTemplate);
        return jdbcService;
    }
}
